def str_reverse(string: str) -> str:
    """
    字符串反转
    :param string: 传入的字符串
    :return: 反转后的字符串
    """
    return string[::-1]


def sub_str(string, x, y):
    return string[x:y]


if __name__ == '__main__':
    print(str_reverse('abcde'))

    print(sub_str('abcde', 1, 3))
